<%@page import="java.util.List,com.crm.entity.Executives" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/temp.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<!-- InstanceEndEditable -->
<link href="<%=application.getContextPath()%>/css-crm.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.7.2.min.js"></script>
<script language="javaScript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.20.custom.min.js"></script>

<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/jquery-ui-1.8.17.custom.css"/>
	
<script language="JavaScript" src="<%=application.getContextPath()%>/js/gen_validatorv4.js" type="text/javascript" ></script>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>	
<script>

	$(function() {
		$( "#from" ).datepicker({ dateFormat: "dd-mm-yy" },"option", "autoSize", true);
		$( "#to" ).datepicker({ dateFormat: "dd-mm-yy" },"option", "autoSize", true);
	});
	</script>
</head>

<body>
<div id="main">
  <%@include file="common/header.jsp" %>
      <%@include file="common/submenu.jsp" %>
  <div id="content">
    <div id="work-area2">
      
	  
      <div class="boxIFS">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="295" align="left" valign="top"><table width="295" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="28">&nbsp;</td>
                <td width="109">&nbsp;</td>
                <td width="158">&nbsp;</td>
              </tr>
              <tr>
                <td height="28">&nbsp;</td>
                <td align="left" valign="top">Executive Name  </td>
                <td align="left" valign="top">
                <select name="execName" class="form" id="execId">
                <option value="">Please Select</option>
                <%
                	List<Executives> liex=(List<Executives>)request.getAttribute("execList");
                	if(liex!=null){
                	for(int i=0;i<liex.size();i++){
                	%>
                	
                		<option value="<%=liex.get(i).getExeName() %>"><%=liex.get(i).getExeName() %></option>
                		
                	<%}
                	}
                %>
                </select></td>
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
                <td align="left" valign="top">&nbsp;</td>
                <td align="left" valign="top">&nbsp;</td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
            <td width="401" align="left" valign="top"><table width="401" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="26">&nbsp;</td>
                <td width="62">&nbsp;</td>
                <td width="152">&nbsp;</td>
                <td width="37">&nbsp;</td>
                <td width="124">&nbsp;</td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
                <td align="left" valign="top">From </td>
                <td align="left" valign="top"><input name="from" type="text" class="form-small" value="" id="from"/></td>
                <td align="left" valign="top">To</td>
                <td align="left" valign="top"><input name="to" type="text" class="form-small" value="" id="to"/></td>
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
                <td align="left" valign="top"></td>
                <td align="left" valign="top"></td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><input type="button" value="Show Business" class="button" id="showButton"/></td>
              </tr>
            </table></td>
          </tr>
        </table>
      </div>
	  
	  
	  <div class="box2" id="resDiv"></div>
	  <div class="boxtable" id="result">
	   <div id="partsDiv"></div>
	  </div>
    </div>
    <table style="height:300px; width:910px;" ><tr><td>
	   
	  </td>
	  </tr>
	  </table>
	  
    <!-- InstanceEndEditable -->
  </div><div id="footer"></div>  
</div>

</body>
<!-- InstanceEnd --></html>
<script type="text/javascript">
$("#showButton").click(function(){
	var execName=$("#execId").val();
	var from=$("#from").val();
	var to=$("#to").val();
	$.ajax({
		url:"<%=application.getContextPath()%>/execBusiness/getReport.do" ,
	  	data:"execName="+execName+"&from="+from+"&to="+to,
	  	success:function(res){
	  		
	  		$('#resDiv').html(res);
			
	  	}
	  });	
});
</script>